import java.math.BigDecimal;

public class test5 {
	public static void main(String[] args) {
		double f =   1;
	   test5 t = new test5();
	   t.m1(f);
	}
	
	
	 public void m1(double f) {
		    f=f/1000;
	        BigDecimal bg = new BigDecimal(f);
	        double f1 = bg.setScale(3, BigDecimal.ROUND_HALF_UP).doubleValue();
	        System.out.println(f1);
	    }
}
